package com.bwda.dsrs.filecenter.service;

import com.bwda.dsrs.filecenter.condition.DbScanTableHandleParams;
import com.bwda.dsrs.filecenter.domain.condition.dbscanresult.DbScanResultCondition;
import com.bwda.dsrs.filecenter.domain.po.dbscanresult.DbScanResultPo;

import java.util.List;

/**
 * Db scan result service
 * @author Administrator
 */
public interface DbScanResultService extends BaseService<DbScanResultPo, DbScanResultCondition> {
     /**
      * Scan *
      *
      * @param dbId          db id
      * @param taskId        task id
      * @param taskHistoryId task history id
      * @param rowNum        row num
      */
     void scan(Integer dbId,Integer taskId,Integer taskHistoryId,Integer rowNum);

     /**
      * Scan db group boolean
      *
      * @param dbGroupIds    db group ids
      * @param taskId        task id
      * @param taskHistoryId task history id
      * @param rowNum        row num
      * @return the boolean
      */
     Boolean scanDbGroup(List<Integer> dbGroupIds,Integer taskId,Integer taskHistoryId,Integer rowNum);

     /**
      * Table handle *
      *
      * @param dbScanTableHandleParams db scan table handle params
      */
     void tableHandle(DbScanTableHandleParams dbScanTableHandleParams);

     /**
      * Query tablee column list list
      *
      * @param dbScanResultCondition db scan result condition
      * @return the list
      */
     List<DbScanResultPo> queryTableeColumnList(DbScanResultCondition dbScanResultCondition);

     /**
      * Query distinct table list list
      *
      * @param dbScanResultCondition db scan result condition
      * @return the list
      */
     List<DbScanResultPo> queryDistinctTableList(DbScanResultCondition dbScanResultCondition);

     /**
      * Count distinct table integer
      *
      * @param dbScanResultCondition db scan result condition
      * @return the integer
      */
     Integer countDistinctTable(DbScanResultCondition dbScanResultCondition);

     /**
      * Count sens column integer
      *
      * @param dbScanResultCondition db scan result condition
      * @return the integer
      */
     Integer countSensColumn(DbScanResultCondition dbScanResultCondition);

     /**
      * Update type and level *
      *
      * @param dbScanResultPos         db scan result pos
      * @param dbScanTableHandleParams db scan table handle params
      */
     void updateTypeAndLevel(List<DbScanResultPo> dbScanResultPos,DbScanTableHandleParams dbScanTableHandleParams);


     /**
      * 新查询列表
      *
      * @param condition condition
      * @return list
      */
     List<DbScanResultPo> queryDbSrPageList(DbScanResultCondition condition);


     /**
      * 查询标记过的数据
      *
      * @param condition condition
      * @return list
      */
     List<DbScanResultPo> queryApproveList(DbScanResultCondition condition);
}